Skip to content

fix(coding-agent): share evolution evidence - #107

Merged
Pepps233 merged 14 commits into
feat/evolution-recovery-e2efrom
fix/evolve-unprocessed-materialized-tokens
Aug 23, 2026
Merged

Pepps233 merged 14 commits into
feat/evolution-recovery-e2efrom
fix/evolve-unprocessed-materialized-tokens

Conversation

@Pepps233

@Pepps233 Pepps233 commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

work in progress

Summary

Makes /evolve use one global, live evidence corpus for the globally selected harness.
Completed prompts become visible while Diffex processes remain running, and active evolution progress stays current even when another process owns the worker.

Reasoning

Evolution persistence and trace filtering were keyed by the launch directory even though harness selection and evolution memory are global.
That allowed the same harness revision to report different token and invocation totals across working directories.
Process-owned traces also remained mutable and locked until CLI shutdown, so completed prompts could not be discovered safely while sessions were running.
Ignoring active locks would let the reflector cache changing traces and could duplicate evidence.
Immutable operation intervals preserve stable evidence while retaining unique trace files and lock-protected ordering across concurrent processes.

Evolution progress events are process-local, but evolution jobs are global and durable.
Polling active durable state keeps View and Browse accurate when a peer process executes the job.
Terminally failed jobs are non-resumable, so they no longer block or capture future manual evolution attempts.

Changes

  • Uses one global evolution scope and persistence root across working directories.
  • Removes repository filtering from materialized trace evidence.
  • Persists evidence order under the trace directory with atomic writes and multi-process locking.
  • Publishes immutable trace intervals when all overlapping operations in an interval settle.
  • Lazily creates a new timestamped UUID trace for later operations in the same process.
  • Keeps concurrent sessions in separate files and deduplicates overlapping session evidence within an interval.
  • Lets a new manual evolution start after a terminal failure while preserving attachment to active or resumable jobs.
  • Polls durable active-job state so View and Browse update across Diffex processes.
  • Reports manual and automatic terminal runs under Last evolution.
  • Distinguishes pending or unavailable reflection coverage from actual zero coverage.
  • Makes terminal job results and local timestamps explicit in Browse.
  • Simplifies user-facing evolution labels and job details.
  • Adds regressions for live refresh, concurrent sessions, overlapping operations, trace locks, global scope, evidence ordering, failed jobs, polling, and TUI wording.

Testing

  • npm run check
  • node ../../node_modules/vitest/dist/cli.js --run test/control-service.test.ts from packages/evolution
  • node ../../node_modules/vitest/dist/cli.js --run test/evolution-menu.test.ts test/interactive-mode-evolution.test.ts from packages/coding-agent
  • Two simultaneous interactive Diffex sessions ran in /Users/jialeyu/Projects/diffex-new and /Users/jialeyu/Projects/test_diffex/test_2 without exiting either process.
  • Prompts from both sessions advanced both overviews while the processes remained running.
  • Concurrent prompts created separate UUID-named .jsonl files and the shared index admitted each once.
  • A resumed diffex-test session started a fresh manual evolution after the prior terminal failure.
  • The live overview showed Evolve [Started], enabled View, and enabled Cancel.
  • Browse advanced from 1 model call and 3 tool calls to 2 model calls and 10 tool calls without pressing Refresh.

- Distinguishes directory-scoped evidence totals from the global harness selection
- Prevents users from interpreting different project counts as harness state divergence
- Aligns unprocessed token and invocation totals with the globally selected harness
- Locks active traces and exposes only an immutable global prefix to keep cursors stable across processes
- Keeps the overview and manual-start confirmation aligned with shared evidence state
- Makes the evidence and selected harness scopes explicit in the TUI
@Pepps233 Pepps233 self-assigned this Aug 20, 2026
- Lets completed invocations advance global evidence while older sessions remain active
- Preserves monotonic ingestion cursors across concurrent processes
- Publishes immutable operation intervals before process exit
- Preserves unique evidence across concurrent sessions and overlapping operations
- Stabilizes RPC shutdown readiness coverage
- Documents operation-level rollover and multi-file process traces
- Clarifies interval termination evidence
- Keeps implementation details out of the user-facing overview
- Makes evolution actions and automatic status easier to scan
- Allows fresh manual runs after non-resumable failures while preserving recoverable work\n- Exposes terminal timestamps and unavailable coverage so clients can distinguish failed reflection
- Polls durable active-job state so menus update when another process owns the worker\n- Makes terminal results, timestamps, and incomplete coverage explicit to users
- Keep failed jobs from advancing successful evolution state and persist private per-job diagnostics.
- Scope reflector tools to each node and return recoverable denials to the model.
- Keep canonical artifact IDs out of model-authored fields
- Preserve deterministic resolution across retries and recovery
- Stabilize subagent startup and cancellation exposed by the suite
- Accept missing evidence type prefixes only when the typed alias exists in the current node catalog
- Audit each normalization while preserving strict rejection of wrong-kind, unavailable, duplicate, and cross-node references
- Removes reflector tools that duplicated inline catalogs while retaining search, slice reads, and boundary repair
- Combines existing curator guidance inspection and preserves immutable slice continuation metadata
@Pepps233
Pepps233 marked this pull request as ready for review August 23, 2026 16:37
@Pepps233
Pepps233 merged commit 80973d1 into main Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant